package annotation.display;

import calm.museum.R;
import jenamuseum.annotation.Annotation;
import jenamuseum.annotation.AnnotationBase;
import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class TextAnnotationDisplay extends Dialog {

	public TextAnnotationDisplay(Context context, Annotation annotation) {
		super(context);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		this.setContentView(R.layout.show_annotation);
		TextView annotationTitle = (TextView)findViewById(R.id.showAnnotationTitle);
		TextView annotationAuthorDate = (TextView) findViewById(R.id.showAnnotationAuthorDate);
		TextView annotationBody = (TextView)findViewById(R.id.showAnnotationBody);
		Button buttonOK = (Button)findViewById(R.id.buttonOK);
		buttonOK.setOnClickListener(new android.view.View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				TextAnnotationDisplay.this.dismiss();
				
			}
		});
		annotationTitle.setText(annotation.title);
		annotationAuthorDate.setText(annotation.author);
		annotationBody.setText(annotation.body);			
		this.show();

		// TODO Auto-generated constructor stub
	}
	

}
